﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Tetris
{
    /// <summary>
    /// Interaktionslogik für MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
        Game game = new Game();
        private void Form_Activated(object sender, EventArgs e)
        {
            game.Drawfield(field);
            //GameOver m = new GameOver(30);
            //m.Show();
        }

        private void field_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            field.Children.Clear();
            game.Drawfield(field);
            field.Width = field.ActualHeight / 2;
        }

        private void Form_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Up) 
            {
            }
            if (e.Key == Key.Down)
            {
            }
            if (e.Key == Key.Left)
            {
            }
            if (e.Key == Key.Right)
            {
            }
        }
    }
}
